
package com.soft;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

@SpringBootApplication
public class MainApplication {
  public static void main(String[] args) {
    ApplicationContext context = SpringApplication.run(MainApplication.class, args);
    String[] beanNames = context.getBeanDefinitionNames();
    for (String beanName : beanNames) {
      System.out.println("====>" + beanName);
    }
    System.out
        .println("--------------------------------------------------------------------------");
    System.out.println(context.getBean("user"));

  }
}
